import { registerMicroApps, start } from 'qiankun';

registerMicroApps([
    {
        name: 'vueApp',
        entry: '//localhost:8001',
        container: '#subapp-viewport',
        activeRule: '/vue3',
    }, {
        name: 'reactApp',
        entry: '//localhost:8002',
        container: '#subapp-viewport',
        activeRule: '/react'
    }
],
    {
        beforeLoad: (app) => {
            console.log('before load', app.name);
        },
        beforeMount: (app) => {
            console.log('before mount', app.name);
        },
        beforeUnmount: (app) => {
            console.log('before unmount', app.name);
        },
        afterMount: (app) => {
            console.log('after mount', app.name);
        },
        afterUnmount: (app) => {
            console.log('after unmount', app.name);
        },
    }
)
start();
